home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / pcutils / os2 / jview / example.cmd < prev    next >
Encoding:
Text File  |  1995-12-31  |  1.6 KB  |  45 lines

  1. /*This is a REXX routine that demonstraights some of the scripting*/
  2. /*capabilites of JView.  The REXX routine is run from JView. */
  3. /*You can drag this file onto JView, or open it using the JView */
  4. /*File Open dialog.*/
  5. /*This example is set up for a screen resolution of 1024 by 768*/
  6. /*Note that / is never used for division, only % which guarantees */
  7. /*an integer result.  This example just moves the current image*/
  8. /* around the screen a few times*/
  9.  
  10. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  11. Call SysLoadFuncs
  12. Screen_resolution_x = 1024
  13. Screen_resolution_y = 768
  14. rc = JVWGetImageInfo()
  15. PARSE VAR rc wide high depth colors position_x position_y window_w window_h crop_status crop_left crop_bottom crop_right crop_top
  16. horizontal = Screen_resolution_x - window_w
  17. vertical = Screen_resolution_y - window_h
  18. do 2
  19.   JVWSizeWindow("move", "abs", horizontal % 2,  vertical % 2)
  20.   Call SysSleep 1
  21.   JVWSizeWindow("move", "abs",  "0",  "0")
  22.   Call SysSleep 1
  23.   JVWSizeWindow("move", "abs",  "0",  vertical)
  24.   Call SysSleep 1
  25.   JVWSizeWindow("move", "abs",  horizontal,  vertical)
  26.   Call SysSleep 1
  27.   JVWSizeWindow("move", "abs", horizontal,  "0")
  28.   Call SysSleep 1
  29.   JVWSizeWindow("move", "abs",  "0",  "0")
  30.   Call SysSleep 1
  31.   do vertical%3
  32.      JVWSizeWindow("move", "relative",  "0",  "3")
  33.   end
  34.   do horizontal%3
  35.      JVWSizeWindow("move", "relative",  "3",  "0")
  36.   end
  37.   do vertical%3
  38.      JVWSizeWindow("move", "relative",  "0",  "-3")
  39.   end
  40.   do horizontal%3
  41.      JVWSizeWindow("move", "relative",  "-3",  "0")
  42.   end
  43. end
  44.  
  45.